package com.fjp.heartguard.ui.message

import android.os.Bundle
import com.fjp.heartguard.app.Constants
import com.fjp.heartguard.app.base.BaseActivity
import com.fjp.heartguard.app.data.bean.Message
import com.fjp.heartguard.databinding.ActivityMessageDetailBinding
import com.fjp.heartguard.viewmodel.MessageDetailViewModel

class MessageDetailActivity : BaseActivity<MessageDetailViewModel, ActivityMessageDetailBinding>() {
    override fun initView(savedInstanceState: Bundle?) {
        mDatabind.viewModel = mViewModel
        mViewModel.title.set("消息详情")
        val messageData = intent.getParcelableExtra<Message>(Constants.INTENT_MESSAGE)
        mViewModel.getMessageDetail(messageData!!.id)
        mViewModel.message.set(messageData)
    }


}